$(function () {
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        laydate.render({
            elem: '#creatDate'
        });
    });
})

function addProduct() {
    $.post("/product/add",$("#productForm").serialize(),function (info) {
        if (info == "ok"){
            location.href = "main.html";
        }
    })
}